package com.google.code.expr.lang;

public enum EXPROperator {
	PLUS(1),
	MINUS(1),
	MULTIPLY(1),
	DIVIDE(1),
	
	LESS_THAN(2),
	LESS_EQUALS(2),
	MORE_THAN(2),
	MORE_EQUALS(2),

	EQUALS(3),
	NOT_EQUALS(3),

	AND(4),
	
	XOR(5),

	OR(6);
	private int precedence;
	
	EXPROperator(int pPrecedence) {
		precedence = pPrecedence;
	}
	
	public boolean hasHigherPrecedenceThan(EXPROperator pOther) {
		return precedence < pOther.precedence;
	}
}
